﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class list_user : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        ctp_lib.check_login(this.Page, "list_user.aspx");
        if ((int)Session["userno"] != 1 && (int)Session["userno"] != 9)
        {
            Response.Write(Session["userno"].ToString());
            Response.Write("error");
            return;
        }

        ctpDataContext db=new ctpDataContext();
        var user1 = from p in db.users
                   select p;

        foreach (user p in user1)
        {
            p.email = p.email.Trim();
        }

        this.DataList1.DataSource = user1;
        this.DataBind();

    }
}
